package com.dao;

import com.pojo.Student;

import java.util.Scanner;

/**
 * @author 陈Ser
 * @ClassName ScannerToObj
 * @description: TODO
 * @Date 2021/9/10 15:02
 * @Version 1.0
 */
public class ScannerToObj {
    private Scanner sc = new Scanner(System.in);

    public Student get() {
        System.out.println("请输入学生学号:");
        String sid = sc.nextLine();

        System.out.println("请输入学生姓名:");
        String name = sc.nextLine();

        System.out.println("请输入学生年龄:");
        int age = sc.nextInt();

        System.out.println("请输入学生生日:");
        String birthday = sc.nextLine();
        return new Student(sid, name, age, birthday);
    }
}
